home *** CD-ROM | disk | FTP | other *** search
- <?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:yelp="http://www.gnome.org/yelp/ns"
- xmlns="http://www.w3.org/1999/xhtml"
- extension-element-prefixes="yelp"
- version="1.0">
-
- <xsl:param name="help_icon"/>
- <xsl:param name="help_icon_size"/>
-
- <xsl:param name="yelp.color.fg"/>
- <xsl:param name="yelp.color.bg"/>
- <xsl:param name="yelp.color.anchor"/>
- <xsl:param name="yelp.color.rule"/>
- <xsl:param name="yelp.color.gray.fg"/>
- <xsl:param name="yelp.color.gray.bg"/>
- <xsl:param name="yelp.color.gray.bg.dark1"/>
- <xsl:param name="yelp.color.gray.bg.dark2"/>
- <xsl:param name="yelp.color.gray.bg.dark3"/>
- <xsl:param name="yelp.color.selected.fg"/>
- <xsl:param name="yelp.color.selected.bg"/>
- <xsl:param name="yelp.color.selected.bg.dark1"/>
- <xsl:param name="yelp.color.selected.bg.dark2"/>
- <xsl:param name="yelp.color.selected.bg.dark3"/>
- <xsl:param name="yelp.color.admon.fg"/>
- <xsl:param name="yelp.color.admon.bg"/>
- <xsl:param name="yelp.color.admon.bg.dark1"/>
- <xsl:param name="yelp.color.admon.bg.dark2"/>
- <xsl:param name="yelp.color.admon.bg.dark3"/>
-
- <xsl:param name="yelp.toc.id" select="'Man-man6'"/>
-
- <xsl:template match="toc">
- <yelp:document href="{@id}">
- <html>
- <head>
- <title>
- <xsl:value-of select="title[1]"/>
- </title>
- <style type="text/css"><xsl:text>
- body {
- margin: 0px;
- padding: 0px;
- }
- h1 {
- font-size: 1.6em;
- margin-bottom: 0.4em;
- margin-top: 12px;
- margin-left: 12px;
- margin-right: 12px;
- padding-left: 204px;
- padding-top: 0.2em;
- padding-bottom: 0.2em;
- -moz-border-radius: 6px;
- border: solid 1px </xsl:text>
- <xsl:value-of select="$yelp.color.selected.bg.dark1"/><xsl:text>;
- background-color: </xsl:text>
- <xsl:value-of select="$yelp.color.selected.bg"/><xsl:text>;
- color: </xsl:text>
- <xsl:value-of select="$yelp.color.selected.fg"/><xsl:text>;
- }
- h1 img {
- position: absolute;
- top: 6px;
- right: 18px;
- }
- h2 h3 {
- color: </xsl:text><xsl:value-of select="$yelp.color.fg"/><xsl:text>;
- }
- div[class~="body"] { }
- div[class~="leftbar"] {
- position: absolute;
- top: 4em;
- left: 12px;
- width: 192px;
- min-height: 192px;
- text-align: left;
- /* padding-top: </xsl:text>
- <xsl:value-of select="$help_icon_size"/><xsl:text>px;
- background-image: url("</xsl:text>
- <xsl:value-of select="$help_icon"/><xsl:text>");
- background-position: </xsl:text>
- <xsl:value-of select="(192 - $help_icon_size) div 2"/><xsl:text>px 0px;
- background-repeat: no-repeat;
- opacity: .3; */
- }
- div[class~="leftbackground"] {
- position: absolute;
- top: 4em;
- left: 1px;
- width: 210px;
- min-height: 192px;
- text-align: center;
- padding-top: 0px;
- background-image:url("</xsl:text>
- <xsl:value-of select="$help_icon"/><xsl:text>");
- background-position: </xsl:text>
- <xsl:value-of select="(192 - $help_icon_size) div 2"/><xsl:text>px 0px;
-
- background-repeat: no-repeat;
- opacity: .1;
- }
- div[class~="rightbar"] {
- margin-left: 216px;
- padding-bottom: 1em;
- padding-top: 1em;
- padding-left: 1em;
- padding-right: 1em;
- margin-right: 12px;
- background-color: </xsl:text><xsl:value-of select="$yelp.color.bg"/><xsl:text>;
- color: </xsl:text><xsl:value-of select="$yelp.color.fg"/><xsl:text>;
- -moz-border-radius: 8px;
- }
- ul { margin-left: 0em; padding-left: 0em; }
- li[class~="toclist"] {
- margin-top: 0.3em;
- margin-left: 0em;
- padding-left: 0em;
- font-size: 1.2em;
- list-style-type: none;
- }
- li li[class~="toclist"] {
- padding-left: 0.8em;
- font-size: 0.8em;
- }
- li li li[class~="toclist"] {
- padding-left: 0.8em;
- font-size: 0.6em;
- }
- li[class~="toc"] {
- margin-left: 0em;
- font-size: 1.2em;
- padding-top: 0.5em;
- list-style-type: none;
- }
- dl { margin-left: 0em; padding-left: 0em; }
- dt { font-size: 1.2em; margin-top: 1em; }
- dd { margin-left: 1em; margin-top: 0.5em; }
- a { text-decoration: none; color: </xsl:text><xsl:value-of select="$yelp.color.anchor"/><xsl:text>; }
- a:hover { text-decoration: underline; }
- </xsl:text></style>
- </head>
- <body>
- <xsl:apply-templates mode="body.mode" select="."/>
- </body>
- </html>
- </yelp:document>
- </xsl:template>
-
- <xsl:template name="print.documents">
- <div class="docs">
- <dl>
- <xsl:for-each select="doc">
- <xsl:sort select="normalize-space(title)"/>
- <dt class="doc">
- <a href="{@href}" title="{@href}">
- <xsl:if test="tooltip">
- <xsl:attribute name="title">
- <xsl:value-of select="tooltip"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="title"/>
- </a>
- </dt>
- <dd>
- <xsl:value-of select="description"/>
-
- </dd>
- </xsl:for-each>
- </dl>
- </div>
- </xsl:template>
-
- <xsl:template name="print.subsections">
- <div class="tocs">
- <ul>
- <xsl:for-each select="toc[../@id = 'index' or .//doc]">
- <xsl:sort select="number(../@id = 'index') * position()"/>
- <xsl:sort select="normalize-space(title)"/>
- <li class="toc">
- <a href="x-yelp-toc:{@id}">
- <xsl:apply-templates select="title[1]/node()"/>
- </a>
- </li>
- </xsl:for-each>
- </ul>
- </div>
- </xsl:template>
-
- <xsl:template mode="body.mode" match="toc">
- <div class="leftbackground">
- </div>
- <div class="body">
- <h1>
- <xsl:if test="icon">
- <img src="{icon/@file}"/>
- </xsl:if>
- <xsl:apply-templates select="title"/>
- </h1>
- <div class="rightbar">
- <h3><xsl:apply-templates select="description/node()"/></h3>
- <xsl:choose>
- <!-- if there are documents and subsections, only print documents -->
- <xsl:when test="doc[1] and toc[.//doc[1]]">
- <xsl:call-template name="print.documents"/>
- </xsl:when>
- <!-- if there are documents, print them -->
- <xsl:when test="doc[1]">
- <xsl:call-template name="print.documents"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="@id='index'">
- <!-- Main page!!! -->
- <div class="leftbar">
- <h2><xsl:value-of select="topic_title"/></h2>
- <xsl:for-each select="topics//topic">
- <xsl:sort order="descending" data-type="number" select="@priority"/>
- <h3><a href="{@uri}"><xsl:value-of select="."/></a></h3>
- </xsl:for-each>
- </div>
-
- <p><xsl:value-of select="desc1"/></p>
- <h3><xsl:value-of select="common"/></h3>
- <ul>
- <li><a href="ghelp:internet#connect-to-internet"><xsl:value-of select="q1"/></a></li>
- <li><a href="ghelp:desktop-effects"><xsl:value-of select="q2"/></a></li>
- <li><a href="ghelp:musicvideophotos#music"><xsl:value-of select="q3"/></a></li>
- <li><a href="ghelp:musicvideophotos#photos"><xsl:value-of select="q4"/></a></li>
- <li><a href="ghelp:keeping-safe#updates"><xsl:value-of select="q5"/></a></li>
- </ul>
- <h3><xsl:value-of select="notfound"/></h3>
- <p><xsl:value-of select="freesupport_pre"/><xsl:text> </xsl:text> <a href="{freesupport_loc}"><xsl:value-of select="freesupport_link"/></a><xsl:text> </xsl:text> <xsl:value-of select="freesupport_after"/></p>
- <p><xsl:value-of select="commercialsupport_pre"/><xsl:text> </xsl:text> <a href="{commercialsupport_loc}"><xsl:value-of select="commercialsupport_link"/></a><xsl:text> </xsl:text> <xsl:value-of select="commercialsupport_after"/></p>
- <h3><xsl:value-of select="how_contribute"/></h3>
- <p><xsl:value-of select="community_pre"/><xsl:text> </xsl:text> <a href="{community_loc}"><xsl:value-of select="community_link"/></a><xsl:text> </xsl:text> <xsl:value-of select="community_after"/></p>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="print.subsections"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </div>
- </xsl:template>
-
- <xsl:template match="/">
- <xsl:apply-templates select="//toc[@id = $yelp.toc.id]" />
- </xsl:template>
-
- </xsl:stylesheet>
-